// 导入封装的请求实例
import request from '@/utils/request'
// 请求方法
export const getSysRoleListApi = params => {
  return request({
    url: '/admin/sys_role/list',
    method: 'get',
    // params: params  // axios写在params里面的信息会自动拼接到路径地址上变成查询参数(query参数)
    params
  })
}
// 查询单个
export const getSysRoleInfoApi = params => {
  //params 提交的是 { id:142}
  return request({
    url: '/admin/sys_role/rowInfo',
    method: 'get',
    params
  })
}

// 添加
export const addSysRoleInfoApi = data => {
  return request({
    url: '/admin/sys_role/add',
    method: 'post',
    data
  })
}
// 修改
export const updateSysRoleInfoApi = data => {
  return request({
    url: '/admin/sys_role/update',
    method: 'post',
    data
  })
}
// 删除
//  { id:142}
export const delSysRoleInfoApi = params => {
  return request({
    url: '/admin/sys_role/del',
    method: 'get',
    params
  })
}